package com.day22.Addable;

import com.day22.Lambda.Flyable;

public class LambdaDemo{
    public static void main(String[] args) {
        useAddable((x,y)->{
            return x+y;
        });
        useFlyable(s->System.out.println(s));
        useAddable((x,y)->x+y);
    }
    private static  void useFlyable(Flyable f){
        f.fly("hello");
    }
    private static void useAddable(Addable a){
        int result=a.add(10,20);
        System.out.println(result);
    }
}
